package org.zachary.creditbusiness.commodityandhouse.service;

import org.zachary.creditbusiness.commodityandhouse.entity.House;
import java.util.List;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
public interface HouseService {
    House getHouseById(Integer id);
    List<House> getAllHouses();
    House createHouse(House house);
    House updateHouse(House house);
    void deleteHouse(Integer id);

    // 分页相关方法
    Page<House> getHouses(int page, int size);
    Page<House> searchByTitle(String title, int page, int size);
    Page<House> filterByDistrict(String district, int page, int size);
    Page<House> filterByPriceRange(Double minPrice, Double maxPrice, int page, int size);
    Page<House> filterByRentalType(String rentalType, int page, int size);
    Page<House> filterHouses(String title, String district, String rentalType,
                             Double minPrice, Double maxPrice, int page, int size);

    // 保留原有的不分页方法（用于其他地方可能的调用）
    List<House> searchByTitle(String title);
    List<House> filterByDistrict(String district);
    List<House> filterByPriceRange(Double minPrice, Double maxPrice);
    List<House> filterByRentalType(String rentalType);
}